package com.zhentao.feign;

import com.zhentao.api.article.ArticleClientApi;
import com.zhentao.model.article.dto.ArticleDto;
import com.zhentao.model.dtos.ResponseResult;
import com.zhentao.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ArticleClient implements ArticleClientApi {

    @Autowired
    private ArticleService articleServicel;

    @PostMapping("/api/v1/article/save")
    @Override
    public ResponseResult saveArticle(@RequestBody ArticleDto dto) {
        return articleServicel.saveArticle(dto);
    }
}
